home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
New Star Software Collection
/
NSS_Collection.iso
/
3-170 dbase 10 for windows
/
1.ima
/
SAMPLES.PAK
/
PUZZLE.PRG
< prev
next >
Wrap
Text File
|
1993-07-26
|
3KB
|
71 lines
*******************************************************************************
* PROGRAM: Puzzle.prg
*
* WRITTEN BY: Borland Late Night Crew
*
* DATE: 5/93
*
* UPDATED: 7/93
*
* VERSION: Alpha α
*
* DESCRIPTION: This program uses the object model and some Windows API
* functions to create a simple puzzle game, a ray painter,
* and a line painter.
* It brings up a window with 3 pushbuttons, each corresponding
* to the objects above. You can bring up as many instances
* of each object as you like.
* The Ray painter uses event handlers together with Windows
* painting functions to create different colored rays in the
* current window. You can select the color of the rays by
* clicking on the appropriate combination of the RED, GREEN, and
* BLUE pushbuttons that appear both in the Ray painter and in
* the line painter.
* The line painter lets you paint different colored lines inside
* the current window.
*
* PARAMETERS: None
*
* CALLS: DeleteObject()
* SelectObject()
* CreatePen()
* GetDC()
* ReleaseDC()
* MoveTo()
* LineTo()
* SetTextColor()
* FillRect( CPTR()
* CreateSolidBrush()
* * external functions
*
*
*
* USAGE: DO Puzzle
*
*******************************************************************************
*
* $Revision: 1.7 $
*
set proc to sampproc
set talk off
public b,parent,p,globx,globy
* External function declarations
extern pascal CWORD DeleteObject( CWORD ) "GDI.EXE"
extern pascal CWORD SelectObject( CWORD, CWORD ) "GDI.EXE"
extern pascal CWORD CreatePen( CWORD, CWORD, CLONG ) "GDI.EXE"
extern pascal CWORD GetDC( CWORD ) "USER.EXE"
extern pascal CWORD ReleaseDC( CWORD, CWORD ) "USER.EXE"
extern pascal CWORD MoveTo(CWORD, CWORD, CWORD ) "GDI.EXE"
extern pascal CWORD LineTo(CWORD, CWORD, CWORD ) "GDI.EXE"
extern pascal CLONG SetTextColor( CWORD, CLONG ) "GDI.EXE"
extern pascal CWORD FillRect( CWORD, CPTR, CWORD ) "USER.EXE"
extern pascal CWORD CreateSolidBrush( CLONG ) "GDI.EXE"
m = new MenuWindow() && create the menu showing available objects
***************************** End of Puzzle.prg ********************************